package com.fitnessrocks.sweattimer;

import android.os.CountDownTimer;
import android.os.Message;
import android.os.Handler;

import com.fitnessrocks.sweattimer.service.TimerService;

public class SweatCountDownTimer extends CountDownTimer {
    
	long mStartTime;
    long mInterval;
    MainActivity mMA;
    
	public SweatCountDownTimer(MainActivity ma, long startTime, long interval)
	{
		super(startTime, interval);
		mMA = ma;
		mStartTime = startTime;
		mInterval = interval;		
	}
	    
	@Override
	public void onFinish() {
		//mMA.handleMsg("done");
	}

	@Override
	public void onTick(long millisUntilFinished) {
		mMA.handleTextUp(""+millisUntilFinished/mInterval);
		mMA.handleTextDown(""+ (mStartTime-millisUntilFinished)/mInterval);
	}

}
